<template>
  <div>
    <iframe :src="iframeSrc" v-if="iframeSrc" width="100%"
            :style="{borderWidth: 0+'px', minHeight: height + 'px'}"></iframe>
  </div>
</template>

<script>
  export default {
    name: 'Iframe',
    data () {
      return {
        iframeSrc: this.$store.state.iframeSrc,
        height: this.$store.state.screenHeight - 114
      }
    },
    watch: {
      '$store.state.screenHeight' () {
        this.height = this.$store.state.screenHeight - 114
      },
      '$store.state.iframeSrc' () {
        console.log('this.$store.state.iframeSrc', this.$store.state.iframeSrc)
        this.iframeSrc = this.$store.state.iframeSrc
      }
    }
  }
</script>

<style scoped>

</style>
